package pattern.singleton;

/**
 * 饿汉式
 */
public class Singleton1 {
    // 私有化构造方法
    private Singleton1(){}

    // 创建单例对象
    private static Singleton1 singleton1 = new Singleton1();
    public static Singleton1 getInstance() {
        return singleton1;
    }
}
